<template>
    <div class="headers">
        <div class="return-group" @click="doBack()"><img class="header-return" src="https://img.bzhz.jnbygroup.com/return2.png" />
            <span class="home-back">返回</span>
        </div>
        <p class="title"><span>{{title}}</span></p>
         
    </div>
</template>

<script>
    export default {
        name: "headers",
        props: ["title",'event'],
        data () {
            return {
                msg:''
            };
        },
		methods: {
			doBack: function(){
				if (this.event){
					this.$emit('myclick');
				} else {
					this.$router.back(-1);
				}
			}
		}
    }

</script>

<style scoped>
    .headers {
          display: flex;
        width: 100%;
        height: 50px;
        line-height: 50px;
        font-size: 16px;
        background: #fff;
        align-items: center;
        justify-content: space-between;
        border-bottom: 1px solid #D8D8D8;
        box-sizing: border-box;
		position: fixed;
		top: 0;
        left: 0;
        z-index: 100;
    }
    .return-group{
        display: flex;
        align-items: center;
         width: 70px;
    }
    .header-return {
        width: 8px;
        height: 15px;
        margin-left: 18px;
    }
    .home-back{
        margin-left: 4px;
        font-size:16px;
        font-family:PingFangSC-Medium,PingFang SC;
        height: 22px;
        line-height: 22px;
            font-weight:400;
            color:rgba(50,62,73,1);
    }
    .title{
        flex: 1;
        padding-right: 70px;
        text-align: center;
    }
</style>
